/**
 * 
 */
package com.taobao.client.sdk;

import java.util.HashMap;
import java.util.Map;

/**
 * A parent class for the input parameters.
 * Use the template method design pattern.
 * 
 * @author hujingfei.pt
 *
 */
public abstract class CommonRequest {
	public final static String DEFAULT_HEIGHT = "10";
	/**
	 * The method that needs to be implemented in the sub-classes.
	 */
	public abstract void setMapContent(Map<String, String> pairs);
	
	/**
	 * Initialize unchangable parameters
	 */
	public abstract void initialize();
	
	/**
	 * The template method.
	 */
	public Map<String, String> getURLMap() {
		// New a hashmap
		HashMap<String, String> pairs = new HashMap<String, String>();
		// Set the content of the hashmap
		setMapContent(pairs);
		
		return pairs;
	}
	
	
}
